import request from '@/utils/request'

export default {
  // 搜索分页查询
  getList(currentPage, pageSize, organizationQueryVo){
    return request({
      url: `/organization/search/${currentPage}/${pageSize}`,  // 反单引号
      method: 'post',
      data: organizationQueryVo
    })
  },

  getAll(){
    return request({
      url: `/organization`,  // 反单引号
      method: 'get',
    })
  },

  // 根据机构id修改机构状态
  modifyStatusById(organizationId){
    return request({
      url: `/organization/status/${organizationId}`,  // 反单引号
      method: 'put'
    })
  },

  // 删除
  remove(organizationId){
    return request({
      url: `/organization/${organizationId}`,  // 反单引号
      method: 'delete',
    })
  },

  // 增加
  add(organization){
    return request({
      url: `/organization`,  // 反单引号
      method: 'post',
      data: organization
    })
  },

  // 根据ID查询
  queryById(organizationId){
    return request({
      url: `/organization/${organizationId}`,  // 反单引号
      method: 'get',
    })
  },

  // 编辑
  edit(organization){
    return request({
      url: `/organization`,  // 反单引号
      method: 'put',
      data: organization
    })
  },
  //根据机构id查询团队
  getTeamByOrganizationId(organizationId){
    return request({
      url: `/organization/team/${organizationId}`,  // 反单引号
      method: 'get',
    })
  },
}
